package com.subway.babynote.syncdata;

public class safeobj<E> {
	private E e = null;
	private final String lockobj = "lockobj";
	
	public E init(E v)
	{
		return this.set(v);
	}
	public E set(E v)
	{
		synchronized(lockobj)
		{
			e = v;
			return e;
		}
	}
	public E get()
	{
		synchronized(lockobj)
		{			
			return e;
		}
	}
}
